<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <title>小学学区划分</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="../../css/excutive_housekeeper/school.css" />
    <script src="../../js/statistics.js"></script>
	<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp"></script>
</head>

<body>
	<header class="mui-bar mui-bar-nav header">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title" id='title'>小学学区划分</h1>
	</header>
	<div id="container">
	</div>
	<div id="box"></div>
	<!--<div class="search-box clear">
		<div class="input-box">
			<span></span>
			<input id="place" type="text"/ placeholder="请输入地址">
		</div>
		<span class="search-button" id="button">搜索</span>
	</div>-->
	<script src="../../plugins/jquery/jquery-3.1.0.min.js" type="text/javascript" ></script>
	<script src="../../plugins/mui/mui.min.js"></script>
	<script type="text/javascript">
	    mui.init();
	    mui.plusReady(function() {
	    	
	    });
	    $(function(){
	    	var center = new qq.maps.LatLng(31.4158393143,119.4845959033);
		    var map = new qq.maps.Map(document.getElementById('container'),{
		        center: center,
		        zoom: 14,
		        complete:function(res){
		        	var detail = res.detail;
		        	console.log(detail);
		        }
		    });
		    //搜索
//		    var searchService = new qq.maps.SearchService({
//		        map : map
//		    });
//		    var button = document.getElementById('button');
//		    button.addEventListener('tap',function(){
//		    	var address = "溧阳市"+document.getElementById('place').value+"小学",
//		    		localtion = '溧阳市';
//		    		console.log(address);
//	    		searchService.setLocation(localtion);
//  			searchService.search(address);
//		    },false);
		    //软键盘收回
//		    document.getElementById('container').addEventListener('touchstart',function(){
//		    	document.getElementById('place').blur();
//		    },false);
		    //学区划分
		    var path = [
		    //外国语集团
		    	[
		    		new qq.maps.LatLng(31.4436025752,119.4525432587),
        			new qq.maps.LatLng(31.4360232949,119.4790649414),
        			new qq.maps.LatLng(31.4274912945,119.4768762589),
        			new qq.maps.LatLng(31.4053154485,119.4708251953),
        			new qq.maps.LatLng(31.4047110788,119.4781637192),
        			new qq.maps.LatLng(31.4009382584,119.4771766663),
        			new qq.maps.LatLng(31.3900951344,119.4784641266),
        			new qq.maps.LatLng(31.3880802268,119.5066595078),
        			new qq.maps.LatLng(31.3824382554,119.5085048676),
        			new qq.maps.LatLng(31.3874207931,119.4557189941),
        			new qq.maps.LatLng(31.4282053758,119.4555510445)
		    	],
		    	//泓口小学
		    	[
		    		new qq.maps.LatLng(31.4436025752,119.4525432587),
        			new qq.maps.LatLng(31.4360232949,119.4790649414),
			        new qq.maps.LatLng(31.4386230205,119.4805240631),
			        new qq.maps.LatLng(31.4393919369,119.4818973541),
			        new qq.maps.LatLng(31.4393736321,119.4857597351),
			        new qq.maps.LatLng(31.4468244990,119.4850301743)
		    	],
				//实小燕湖
		    	[
		    		new qq.maps.LatLng(31.4047110788,119.4781637192),
        			new qq.maps.LatLng(31.4009382584,119.4771766663),
        			new qq.maps.LatLng(31.3900951344,119.4784641266),
        			new qq.maps.LatLng(31.3880802268,119.5066595078),
			        new qq.maps.LatLng(31.4019638945,119.5113801956)
		    	],
		    	//二实小
		    	[
		    		new qq.maps.LatLng(31.4207164064,119.4970893860),
			        new qq.maps.LatLng(31.4130986505,119.4957590103),
			        new qq.maps.LatLng(31.4136846537,119.4920253754),
			        new qq.maps.LatLng(31.4102418325,119.4921970367),
			        new qq.maps.LatLng(31.4118533815,119.4803524017),
			        new qq.maps.LatLng(31.4047110788,119.4781637192),
			        new qq.maps.LatLng(31.4019638945,119.5113801956),
			        new qq.maps.LatLng(31.4094360476,119.5144271851)
		    	],
		    	//文化小学
		    	[
		    		new qq.maps.LatLng(31.4207164064,119.4970893860),
			        new qq.maps.LatLng(31.4130986505,119.4957590103),
			        new qq.maps.LatLng(31.4136846537,119.4920253754),
			        new qq.maps.LatLng(31.4102418325,119.4921970367),
			        new qq.maps.LatLng(31.4118533815,119.4803524017),
		    		new qq.maps.LatLng(31.4243785688,119.4840431213)
		    	],
		    	//溧城中心
		    	[
		    		new qq.maps.LatLng(31.4274912945,119.4768762589),
        			new qq.maps.LatLng(31.4053154485,119.4708251953),
        			new qq.maps.LatLng(31.4047110788,119.4781637192),
			        new qq.maps.LatLng(31.4118533815,119.4803524017),
		    		new qq.maps.LatLng(31.4243785688,119.4840431213)
		    	],
		    	//昆仑
		    	[
		    		new qq.maps.LatLng(31.4468244990,119.4850301743),
        			new qq.maps.LatLng(31.4393736321,119.4857597351),
        			new qq.maps.LatLng(31.4336248926,119.4858455658),
        			new qq.maps.LatLng(31.4315376833,119.4888710976),
        			new qq.maps.LatLng(31.4321968070,119.4895362854),
        			new qq.maps.LatLng(31.4352543482,119.4892573357),
        			new qq.maps.LatLng(31.4345586290,119.4919395447),
        			new qq.maps.LatLng(31.4329474701,119.4954586029),
        			new qq.maps.LatLng(31.4351811148,119.4963169098),
        			new qq.maps.LatLng(31.4464217646,119.5092344284)
		    	],
		    	//西平小学
		    	[	
		    		new qq.maps.LatLng(31.4360232949,119.4790649414),
			        new qq.maps.LatLng(31.4386230205,119.4805240631),
			        new qq.maps.LatLng(31.4393919369,119.4818973541),
			        new qq.maps.LatLng(31.4393736321,119.4857597351),
		    		new qq.maps.LatLng(31.4336248926,119.4858455658),
        			new qq.maps.LatLng(31.4315376833,119.4888710976),
			        new qq.maps.LatLng(31.4304208242,119.4902658463),
			        new qq.maps.LatLng(31.4280405883,119.4884204865),
			        new qq.maps.LatLng(31.4243785688,119.4840431213),
			        new qq.maps.LatLng(31.4274912945,119.4768762589)
		    	],
		    	//实小书院巷+实小平陵
		    	[	
		    		new qq.maps.LatLng(31.4315376833,119.4888710976),
        			new qq.maps.LatLng(31.4321968070,119.4895362854),
        			new qq.maps.LatLng(31.4352543482,119.4892573357),
        			new qq.maps.LatLng(31.4345586290,119.4919395447),
        			new qq.maps.LatLng(31.4329474701,119.4954586029),
		    		new qq.maps.LatLng(31.4295053560,119.4985485077),
			        new qq.maps.LatLng(31.4284434017,119.4982481003),
			        new qq.maps.LatLng(31.4274180551,119.4940853119),
			        new qq.maps.LatLng(31.4229869640,119.4997072220),
		    		new qq.maps.LatLng(31.4207164064,119.4970893860),
        			new qq.maps.LatLng(31.4243785688,119.4840431213),
			        new qq.maps.LatLng(31.4280405883,119.4884204865),
			        new qq.maps.LatLng(31.4304208242,119.4902658463)
		    	],
		    	//东升小学
		    	[	
		    		new qq.maps.LatLng(31.4329474701,119.4954586029),
		    		new qq.maps.LatLng(31.4295053560,119.4985485077),
			        new qq.maps.LatLng(31.4284434017,119.4982481003),
			        new qq.maps.LatLng(31.4274180551,119.4940853119),
			        new qq.maps.LatLng(31.4229869640,119.4997072220),
		    		new qq.maps.LatLng(31.4207164064,119.4970893860),
			        new qq.maps.LatLng(31.4094360476,119.5144271851),
			        new qq.maps.LatLng(31.4464217646,119.5092344284),
			        new qq.maps.LatLng(31.4351811148,119.4963169098)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4436025752,119.4525432587),
        			new qq.maps.LatLng(31.4360232949,119.4790649414),
        			new qq.maps.LatLng(31.4274912945,119.4768762589),
        			new qq.maps.LatLng(31.4053154485,119.4708251953),
        			new qq.maps.LatLng(31.4047110788,119.4781637192),
        			new qq.maps.LatLng(31.4009382584,119.4771766663),
        			new qq.maps.LatLng(31.3900951344,119.4784641266),
        			new qq.maps.LatLng(31.3880802268,119.5066595078)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4360232949,119.4790649414),
			        new qq.maps.LatLng(31.4386230205,119.4805240631),
			        new qq.maps.LatLng(31.4393919369,119.4818973541),
			        new qq.maps.LatLng(31.4393736321,119.4857597351),
			        new qq.maps.LatLng(31.4468244990,119.4850301743)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4464217646,119.5092344284),
			        new qq.maps.LatLng(31.4351811148,119.4963169098),
		    		new qq.maps.LatLng(31.4329474701,119.4954586029),
		    		new qq.maps.LatLng(31.4295053560,119.4985485077),
			        new qq.maps.LatLng(31.4284434017,119.4982481003),
			        new qq.maps.LatLng(31.4274180551,119.4940853119),
			        new qq.maps.LatLng(31.4229869640,119.4997072220),
		    		new qq.maps.LatLng(31.4207164064,119.4970893860),
			        new qq.maps.LatLng(31.4094360476,119.5144271851)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4207164064,119.4970893860),
			        new qq.maps.LatLng(31.4130986505,119.4957590103),
			        new qq.maps.LatLng(31.4136846537,119.4920253754),
			        new qq.maps.LatLng(31.4102418325,119.4921970367),
			        new qq.maps.LatLng(31.4118533815,119.4803524017),
			        new qq.maps.LatLng(31.4047110788,119.4781637192)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4315376833,119.4888710976),
        			new qq.maps.LatLng(31.4321968070,119.4895362854),
        			new qq.maps.LatLng(31.4352543482,119.4892573357),
        			new qq.maps.LatLng(31.4345586290,119.4919395447),
        			new qq.maps.LatLng(31.4329474701,119.4954586029)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4360232949,119.4790649414),
			        new qq.maps.LatLng(31.4386230205,119.4805240631),
			        new qq.maps.LatLng(31.4393919369,119.4818973541),
			        new qq.maps.LatLng(31.4393736321,119.4857597351),
		    		new qq.maps.LatLng(31.4336248926,119.4858455658),
        			new qq.maps.LatLng(31.4315376833,119.4888710976),
			        new qq.maps.LatLng(31.4304208242,119.4902658463),
			        new qq.maps.LatLng(31.4280405883,119.4884204865),
			        new qq.maps.LatLng(31.4243785688,119.4840431213),
			        new qq.maps.LatLng(31.4274912945,119.4768762589)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4118533815,119.4803524017),
		    		new qq.maps.LatLng(31.4243785688,119.4840431213),
		    		new qq.maps.LatLng(31.4207164064,119.4970893860)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4047110788,119.4781637192),
			        new qq.maps.LatLng(31.4019638945,119.5113801956)
		    	],
		    	[	
		    		new qq.maps.LatLng(31.4274912945,119.4768762589),
		    		new qq.maps.LatLng(31.4282053758,119.4555510445)
		    	],
		    	[	
		    		new qq.maps.LatLng(31.4304208242,119.4902658463),
		    		new qq.maps.LatLng(31.4274180551,119.4940853119)
		    	]
		    ];
		    var points = [
		    	new qq.maps.LatLng(31.4226100000,119.4721700000),
		    	new qq.maps.LatLng(31.4273700000,119.5037900000),
		    	new qq.maps.LatLng(31.4066000000,119.4931900000),
		    	new qq.maps.LatLng(31.3935000000,119.4898000000),
		    	new qq.maps.LatLng(31.4198100000,119.4798900000),
		    	new qq.maps.LatLng(31.4303700000,119.4859700000),
		    	new qq.maps.LatLng(31.4165000000,119.4906100000),
		    	new qq.maps.LatLng(31.4237400000,119.4868200000),
		    	new qq.maps.LatLng(31.4298500000,119.4940500000),
		    	new qq.maps.LatLng(31.4354500000,119.4903700000),
		    	new qq.maps.LatLng(31.4304000000,119.4671900000),
		    	new qq.maps.LatLng(31.4386000000,119.4747700000)
		    ];
		    var colors = [
		    	"#dcd9ea","deedd6","#fee4c3","#fcc9dc","#dcd9ea","#fffddc","#fee4c3","#fcc9dc","#deedd6","#fffddc"
		    ]
		    var labels = [];
		    var schools = [
		    	"外国语小学(建设路)","东升小学","第二实验小学","实验小学(燕湖)","溧城中心小学","西平小学","文化小学","实验小学(平陵)","实验小学(书院巷)","昆仑小学","外国语小学(清安)","泓口小学"
		    ];
		    var titles = [
		    	"外国语学校(建设路校区)","溧阳市东升小学","溧阳市第二实验小学","溧阳市实验小学(燕湖校区)","溧阳市溧城中心小学","溧阳市西平小学","溧阳市文化小学","溧阳市实验小学(平陵校区)","溧阳市实验小学(书院巷校区)","溧阳市昆仑小学","外国语学校(清安校区)","泓口小学"
		    ];
		    var contents = [
		    	"东面：清溪中路（清安桥）－清溪南路以西；北面：平陵西路（清安桥）以南（含南村村委，北水西村委的前水西、后水西、钟家庄、三家村失地农民生）。",
		    	"南面：平陵东路以北；西面：昆仑南路－夏桥－人民路－工农桥（沿护城河）－东平桥－北固桥－北大街－徐格笪路以东。",
		    	"南面：永平大道（G104）以北；西面：燕山南路以东；北面：台港路－南大街－南环路－昆仑南路－平陵东路以南。",
		    	"南面：燕城大道以北；西面：燕山南路以东；北面：永平大道（G104）以南（含原城南乡地块生源）。",
		    	"东面：燕山路－燕山中路以西；南面：永平大道（G104）以北；西边：清溪中路（清安桥）－清溪南路以东；北面：平陵中路（清安桥）以南（含三和社区、湾里村委失地农民生）。",
		    	"东面：竹墅桥－码头街－西成桥－西大街以西；南面：平陵中路－清安桥以北；西面：清溪路（清安桥）－濑江桥－凤凰路（凤凰西桥）以东（含水韵华庭、曙光花园）；北面：凤凰路（凤凰东桥）－博爱路－博爱桥－和平桥－竹墅桥－以南（含胥渚社区失地农民生）。",
		    	"东面：昆仑南路－南环路－南大街以西；南面：台港路以北；西面：燕山中路－燕山路以东；北面：平陵中路以南（含庄家社区失地农民生）。",
		    	"东面：昆仑南路以西；南面：平陵中路以北；西面：西大街－西成桥－码头街－竹墅桥以东；北面：竹墅桥－人民路－夏桥以南。",
		    	"支农桥（沿护城河）－荷花桥－北固桥－东平桥－工农桥，沿人民路至支农桥范围的区域内（含北河沿、北固小区、北大街单号和北大街116号、120号）。",
		    	"东面：北固桥－北大街－徐格笪路以西（含昆仑东苑）；南面：北固桥－北河沿－竹墅桥－和平桥－博爱桥以北；西面：博爱桥－博爱路－肇庄路以东（含前棠社区、宋庄社区、棠下社区、徐格笪村委、昆仑村委、毛场村委、夏庄村委失地农民生）。",
		    	"东面：濑江桥（沿清溪路）—清安桥以西；南面：平陵西路以北；北面：南河以南。",
		    	"东面：清溪路（濑江桥）—凤凰路（凤凰东桥）—肇庄路以西；南面：南河以北（含原泓口乡地块生源）。"
		    ];
		    for(i=0;i<path.length;i++){
		    	if(i > 9 && i < 18){
		    		var polyline = new qq.maps.Polyline({
				        path: path[i],
		//			        strokeColor: '#eb646a',
//						fillColor: qq.maps.Color.fromHex("#FFFFFF",0.5),
				        strokeWeight: 2,
				        editable:false,
				        strokeDashStyle:'solid',
						strokeColor: new qq.maps.Color(0, 0, 0, 0.8),
				        map: map
				    });
		    	}else if(i <= 9){
		    		var polyline = new qq.maps.Polygon({
				        path: path[i],
	//			        strokeColor: '#eb646a',
						fillColor: qq.maps.Color.fromHex(colors[i],0.5),
	//			        strokeWeight: 2,
	//			        editable:false,
						strokeColor: new qq.maps.Color(0, 0, 0, 0),
				        map: map
				    });
		    	}else{
		    		var polyline = new qq.maps.Polyline({
				        path: path[i],
		//			        strokeColor: '#eb646a',
//						fillColor: qq.maps.Color.fromHex("#FFFFFF",0.5),
				        strokeWeight: 2,
				        editable:false,
				        strokeDashStyle:'dash',
						strokeColor: new qq.maps.Color(0, 0, 0, 0.8),
				        map: map
				    });
		    	}
		    }
		    for(i=0;i<points.length;i++){
		    	var marker = new qq.maps.Marker({
		    		position: points[i],
		    		map: map
		    	}),
		    	cssA = {
		    		color: "#1A1C1B",
		    		fontSize: "12px",
		    		fontWeight: "bold",
		    		background:'#fff',
		    		opacity:'0.9',
		    		padding: "3px 5px",
		    		border:0,
		    		lineHeight:"1.4",
		    		borderRadius: "4px"
		    	},
		    	offsetA= new qq.maps.Size(15, -23);
		    	labels[i] = new qq.maps.Label({
		    		position :points[i],
		    		map: map,
		    		content: schools[i],
		    		style: cssA,
		    		offset: offsetA
		    	});
		    	var markerIcon = new qq.maps.MarkerImage('../../images/icon/school.svg');		    	
		    	
		    	marker.setIcon(markerIcon);
		    	(function(n){
		    		qq.maps.event.addListener(labels[n],'click',function(){
			    		console.log(n)
			    		var html = '<div id="alert-box">' +
			    						'<div>' +
											'<div class="content-box">' +
												'<img src="../../images/schools/primary-' + n + '.jpg">'+
												'<div class="content">学区学校：' + titles[n] +  '<br>学区范围：' + contents[n] + '</div>' +
											'</div>' +
											'<div class="close-box">' +
												'<img src="../../images/icon/close-1.png" class="close-icon">'+
											'</div>' +
										'</div>' +
									'</div>';
						document.getElementById("box").innerHTML = html;
//						var cssB = {
//							color: "#fff",
//				    		fontSize: "12px",
//				    		background: "#43ac45",
//				    		padding: "0 2px",
//				    		borderRadius: "4px",
//				    		border: "0"
//						};
//						for(var j=0;j<points.length;j++){
//							if(j != n){
//								labels[j].setStyle(cssA);
//							}
//						}
//						labels[n].setStyle(cssB);
			    	});
		    	})(i);
		    }
		    $("#box").delegate('.close-icon','tap',function(){
		    	$("#box").empty();
		    })
		    
	    });	
	</script>
</body>

</html>